<?php
session_start();
//ini_set("display_errors", 1);
if(empty($_COOKIE["theme"]))
	setcookie("theme", "1", time() + 360000000);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://www.w3.org/2005/10/profile">
	<link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico" />
	<!--[if IE]><script type="text/javascript">window.location = "ie.php";</script><![endif]-->
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>NDSOJ - <?php echo $pagename; ?></title>
	<link id="css" rel="stylesheet" type="text/css" href="main.css.php<?php echo "?theme={$_COOKIE["theme"]}"; ?>" />
	<script type="text/javascript"> 
	<!--
	function changeTheme(theme) {
		document.getElementById('css').href = "main.css.php?theme=" + theme;
		document.cookie = "theme = " + theme;
	}
	//-->
	</script> 
</head>
<body>
	<div id="wrapper">
